# Build recipe for ca-certificates.
#
# Copyright (c) 2018 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

program=cacert
version=2018-03-07
arch=noarch
release=1

tarname=${program}-${version}.pem

# Remote source(s)
fetch=http://curl.haxx.se/ca/$tarname

description="
CA certificates.

PEM files of CA certificates to allow SSL-based applications to
check for the authenticity of SSL connections.

These are the ca-certificates as extracted by the cURL project.
"

homepage=http://curl.haxx.se/docs/caextract.html
license="MPL 2.0"

build()
{
    set -e

    mkdir -p "$destdir/etc/ssl/certs/"
    install -m 777 -t "$destdir/etc/ssl/certs/" "${tardir}/$tarname"
    cd "$destdir/etc/ssl/certs/"
    ln -s ${program}-${version}.pem cacert.pem
}

